/**********************************************************************/
#include <QHostAddress>
#include <QXmlStreamReader>
/**********************************************************************/
#include "chatclient.h"

/**********************************************************************/
void ChatClient::setReady(int socketDescriptor)
{
  connect(this, SIGNAL(readyRead()), SLOT(readData()));
  setSocketDescriptor(socketDescriptor);
  ipAddress = peerAddress().toString();
}

/**********************************************************************/
void ChatClient::readData()
{
  emit dataReceived(this);
}

/**********************************************************************/
void ChatClient::setNickname(QString nickname)
{
  this->nickname = nickname;
}

/**********************************************************************/
QString ChatClient::getNickname()
{
  return nickname;
}

/**********************************************************************/
QString ChatClient::getIpAddress()
{
  return ipAddress;
}

/**********************************************************************/
void ChatClient::setIpAddress(QString ipAddress)
{
  this->ipAddress = ipAddress;
}
